'''
Author: 贵阳臻芯科技有限公司
Date: 2021-11-29 19:55:24
LastEditTime: 2021-11-30 23:48:53
LastEditors: Please set LastEditors
FilePath: \tcp_python\tcp_client.py
Description: 
Copyright 2021 贵阳臻芯科技有限公司, All Rights Reserved. 
'''
import socket
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(('127.0.0.1',8888))
print(s.recv(1024).decode('utf-8'))
for data in [b'Michael',b'Tracy',b'Sarah']:
    s.send(data)
    print(s.recv(1024).decode('utf-8'))

s.send(b'exit')
s.close()